﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _13泛型继承
{
    /// <summary>
    /// 泛型接口
    /// </summary>
    /// <typeparam name="T">数据类型</typeparam>
    public interface IGenericInterface<T>
    {
        T GetT(T t);
    }
    /// <summary>
    /// 普通类继承泛型接口，必须指定数据类型
    /// </summary>
    public class ComClass : IGenericInterface<int>
    {
        public int GetT(int t)
        {
            return 0;
        }
    }
    /// <summary>
    /// 泛型类从接口继承
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class GenericChildClassI<T> : IGenericInterface<T>
    {
        public T GetT(T t)
        {
            throw new NotImplementedException();
        }
    }


}
